package pyramide;

public class Pyramide {
	public static void main(String[] args) {
		int zeilen = 10;
		for(int i = 0; i<zeilen; i++){
			int a = 0;
			for(int j = 0; j<2*zeilen-1; j++){
				if(j>zeilen-1+i||j<zeilen-1-i){
						System.out.print(" ");
				} else if(j<=zeilen-1){
					a++;
					System.out.print(a);
					if(a%9==0){
						a = 0;
					}
				} else if(i%2!=0){
					System.out.print(a-1);
					a--;
				} else {
					System.out.print(a);
					a--;
				}
			}
			System.out.println();
		}
	}
}

//if(j==zeilen-1+i||j==zeilen-1-i){
//	System.out.print(1);
//} else if(j+4==zeilen+1+i||j==zeilen+1-i){
//	System.out.print(2);
//} else
//System.out.print(" ");
